home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / editor / chktex.lha / chktex / ChkTeX.install < prev    next >
Text File  |  1996-01-25  |  8KB  |  489 lines

  1. ;
  2. ;  ChkTeX.install v1.2, installs the ChkTeX program
  3. ;  Copyright (C) 1995-96 Jens T. Berger Thielemann
  4. ;
  5. ;  This program is free software; you can redistribute it and/or modify
  6. ;  it under the terms of the GNU General Public License as published by
  7. ;  the Free Software Foundation; either version 2 of the License, or
  8. ;  (at your option) any later version.
  9. ;
  10. ;  This program is distributed in the hope that it will be useful,
  11. ;  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. ;  GNU General Public License for more details.
  14. ;
  15. ;  You should have received a copy of the GNU General Public License
  16. ;  along with this program; if not, write to the Free Software
  17. ;  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. ;
  19. ;  Contact the author at:
  20. ;      Jens Berger
  21. ;      Spektrumvn. 4
  22. ;      N-0666 Oslo
  23. ;      Norway
  24. ;      E-mail: <jensthi@ifi.uio.no>
  25. ;
  26. ;
  27. ;
  28.  
  29. (procedure
  30.     GetOS
  31.     (
  32.         (set
  33.             tmpscript
  34.             "T:ChkTeX.install.tmpscript"
  35.         )
  36.  
  37.         (textfile
  38.             (dest tmpscript)
  39.             (append
  40.                 "failat 31\n"
  41.                 "Version exec.library VERSION 36\n"
  42.                 "If ERROR\n"
  43.                 "    SetEnv Installer-Result 10\n"
  44.                 "Else\n"
  45.                 "    If WARN\n"
  46.                 "        SetEnv Installer-Result 5\n"
  47.                 "    Else\n"
  48.                 "        SetEnv Installer-Result 0\n"
  49.                 "    Endif\n"
  50.                 "Endif\n"
  51.             )
  52.             (safe)
  53.         )
  54.  
  55.         (execute 
  56.             tmpscript
  57.             (safe)
  58.         )
  59.  
  60.         (set
  61.             HasNewOS
  62.             (getenv "Installer-Result")
  63.         )
  64.  
  65.         (delete tmpscript)
  66.  
  67.         (if
  68.             (=
  69.                 HasNewOS
  70.                 0
  71.             )
  72.             (set
  73.                 ConfigPath
  74.                 "ENVARC:"
  75.             )
  76.             (set
  77.                 ConfigPath
  78.                 "S:"
  79.             )
  80.         )
  81.     )
  82. )
  83.  
  84.  
  85. (set @app-name "ChkTeX")
  86.  
  87. (welcome)
  88.  
  89. (complete 0)
  90.  
  91. (message
  92.     "Welcome to the ChkTeX installation script. "
  93.     "Please note that it may be wise to run the ChkTeX.sum "
  94.     "script before installing any of the programs, or better "
  95.     "still, use PGP and MD5SUM manually.\n"
  96.     "Before taking the program in use, please read the COPYING file; "
  97.     "it applies to this script as well as the remaining parts of the "
  98.     "package. In short:\n NO WARRANTIES WHATSOEVER.\n\n"
  99.     "Copyright © 1995-96\nJens T. Berger Thielemann\n<jensthi@ifi.uio.no>"
  100. )
  101.  
  102. (complete 10)
  103.  
  104. (set
  105.     @default-dest
  106.     (askdir
  107.         (prompt "Where do you wish ChkTeX installed?")
  108.         (default "C:")
  109.         (help
  110.             "  You can here select where you wish to install the "
  111.             "main ChkTeX executable program.\n\n"
  112.             @askdir-help
  113.         )
  114.     )
  115. )
  116.  
  117. (complete 20)
  118.  
  119. (copyfiles
  120.     (source "ChkTeX")
  121.     (dest @default-dest)
  122.     (infos)
  123. )
  124.  
  125. (complete 30)
  126.  
  127. (GetOS)
  128.  
  129. (complete 40)
  130.  
  131. (if
  132.     (exists
  133.         (tackon
  134.             ConfigPath
  135.             ".chktexrc"
  136.         )
  137.     )
  138.     (
  139.         (set
  140.             ConfigSum
  141.             (getsum
  142.                 (tackon
  143.                     ConfigPath
  144.                     ".chktexrc"
  145.                 )
  146.             )
  147.         )
  148.         (debug ConfigSum)
  149.         (set
  150.             ModifiedConfig
  151.             (and
  152.                 (<>
  153.                     ConfigSum
  154.                     -1288016259
  155.                 )
  156.                 (<>
  157.                     ConfigSum
  158.                     1351485522
  159.                 )
  160.             )
  161.         )
  162.     )
  163. )
  164.  
  165. (complete 50)
  166.  
  167. (if
  168.     (=
  169.         ModifiedConfig
  170.         1
  171.     )
  172.     (
  173.         (set
  174.             ModWarn
  175.             "\nThere exists a *modified* version of the .chktexrc file already."
  176.         )
  177.         (set
  178.             ModDefault
  179.             0
  180.         )
  181.     )
  182.     (
  183.         (set
  184.             ModWarn
  185.             ""
  186.         )
  187.         (set
  188.             ModDefault
  189.             1
  190.         )
  191.     )
  192. )
  193.  
  194. (complete 60)
  195.  
  196. (if
  197.     (=
  198.         @user-level
  199.         2
  200.     )
  201.     (set
  202.         install
  203.         (askbool
  204.             (prompt "Install environment files?" ModWarn)
  205.             (help
  206.                 "  If you select `yes', the default environment files will "
  207.                 "be installed. They will initialize ChkTeX to a `normal' "
  208.                 "behaviour, and give a good starting-point for "
  209.                 "modification.\n"
  210.                 "  However, if you've already installed an earlier version of "
  211.                 "ChkTeX, and modified the .chktexrc file, you will probably not "
  212.                 "want to overwrite that one. However, you should still take a "
  213.                 "look at the included .chktexrc, to be introduced to the new "
  214.                 "keywords that were introduced."
  215.             )
  216.             (default ModDefault)
  217.         )
  218.     )
  219.     (set
  220.         install
  221.         (NOT ModifiedConfig)
  222.     )
  223. )
  224.  
  225. (complete 70)
  226.  
  227. (if
  228.     (=
  229.         install
  230.         1
  231.     )
  232.     (
  233.         (copyfiles
  234.             (source ".chktexrc")
  235.             (dest ConfigPath)
  236.         )
  237.  
  238.         (if
  239.             (=
  240.                 ConfigPath
  241.                 "ENVARC:"
  242.             )
  243.             (copyfiles
  244.                 (source ".chktexrc")
  245.                 (dest "ENV:")
  246.             )
  247.         )
  248.     )
  249. )
  250.  
  251. (complete 75)
  252.  
  253. (if
  254.     (exists
  255.         "HELP:"
  256.         (noreq)
  257.     )
  258.     (set
  259.         docdest
  260.         "HELP:"
  261.     )
  262.     (set
  263.         docdest
  264.         @default-dest
  265.     )
  266. )
  267.  
  268.  
  269. (copyfiles
  270.     (source "")
  271.     (dest docdest)
  272.     (choices
  273.         "COPYING"
  274.         "ChkTeX.readme"
  275.         "ChkTeX.dvi"
  276.         "ChkTeX.ps"
  277.     )
  278.     (prompt "Which documentation files do you wish to install?")
  279.     (help
  280.         "  If you would like to have the documentation online, you have "
  281.         "the possibility here. It might be nice for future reference.\n"
  282.         "  As you may know, the .dvi file is in the Device Independent "
  283.         "format; the .ps file is in PostScript. Please select those "
  284.         "fitting your decoding software.\n"
  285.         "  The remaining files are plain iso-8859-1 encoded text files.\n\n"
  286.         @copyfiles-help
  287.     )
  288.     (confirm)
  289.     (infos)
  290. )
  291.  
  292. (complete 80)
  293.  
  294. (if
  295.     (or
  296.         (exists
  297.             "REXX:"
  298.             (noreq)
  299.         )
  300.         (=
  301.             @user-level
  302.             2
  303.         )
  304.     )
  305.     (copyfiles
  306.         (source "")
  307.         (dest "REXX:")
  308.         (choices
  309.             "ChkTeX.rexx"
  310.             "ChkTeX.ced"
  311.             "ChkTeX.ged"
  312.         )
  313.         (prompt "Which parts of the SCMSG/ARexx interface should be installed?")
  314.         (help
  315.             "  If you've got SCMSG (included in the SAS/C package) and "
  316.             "ARexx installed, these scripts will make the use much more "
  317.             "comfortable.\n"
  318.             "  To use any of these, you must install the `ChkTeX.rexx' "
  319.             "script.\n"
  320.             "  In addition, you may wish to install `ChkTeX.ced' or `ChkTeX.ged' "
  321.             "if you are using respectively CygnusED or GoldED to "
  322.             "edit your LaTeX files.\n"
  323.             "  These interfaces may of course be improved even more, "
  324.             "by making the editor's screen public, and installing the "
  325.             "programs on a hotkey.\n\n"
  326.             @copyfiles-help
  327.         )
  328.         (confirm)
  329.         (infos)
  330.     )
  331. )
  332.  
  333. (complete 90)
  334.  
  335. (if
  336.     (or
  337.         (exists
  338.             "USR:lib/perl"
  339.             (noreq)
  340.         )
  341.         (=
  342.             @user-level
  343.             2
  344.         )
  345.     )
  346.     (copyfiles
  347.         (source "ChkTeX.pl")
  348.         (dest "USR:lib/perl")
  349.         (choices
  350.             "ChkTeX.pl"
  351.         )
  352.         (prompt "Install Emacs (via Perl) interface?")
  353.         (help
  354.             "  If you are using Emacs to edit your files, the compile "
  355.             "package expects the error reports to come in a UNIX-like way. "
  356.             "A Perl script is provided as an translator. To use this, you'll "
  357.             "have to have both Perl and Emacs (not MicroEmacs) installed.\n\n"
  358.             @copyfiles-help
  359.         )
  360.         (confirm)
  361.         (infos)
  362.     )
  363. )
  364.  
  365. (complete 100)
  366.  
  367. (exit
  368.     "The installation of ChkTeX is complete. To enhance the program "
  369.     "function, please take a look at the .chktexrc file, located in the "
  370.     "`" ConfigPath "' directory.\n\n"
  371.     "Have fun."
  372. )
  373.  
  374. ; (if
  375. ;     (=
  376. ;         2
  377. ;         (exists
  378. ;             "LOCALE:"
  379. ;             (noreq)
  380. ;         )
  381. ;     )
  382. ;     (
  383. ;         (set
  384. ;         catalog
  385. ;             (select
  386. ;                 (askchoice
  387. ;                     (prompt "Which language do you wish to install?")
  388. ;                     (choices "English" "Norsk")
  389. ;                     (help
  390. ;                         "ChkTeX can support other languages than English, "
  391. ;                         "you can here select which one you would like.\n"
  392. ;                         "If your OS does not support languages (i.e. OS < 2.1),"
  393. ;                         "select 'English'."
  394. ;                         @askchoice-help
  395. ;                     )
  396. ;                     (default 0)
  397. ;                 )
  398. ;                 ""
  399. ;                 "norsk"
  400. ;             )
  401. ;         )
  402. ;
  403. ;         (if
  404. ;             (<>
  405. ;                 catalog
  406. ;                 ""
  407. ;             )
  408. ;             (copyfiles
  409. ;                 (source
  410. ;                     (cat
  411. ;                         "Catalogs/"
  412. ;                         catalog
  413. ;                         "/ChkTeX.catalog"
  414. ;                     )
  415. ;                 )
  416. ;                 (dest
  417. ;                     (cat
  418. ;                         "LOCALE:Catalogs/"
  419. ;                         catalog
  420. ;                     )
  421. ;                 )
  422. ;                 (infos)
  423. ;             )
  424. ;         )
  425. ;     )
  426. ; )
  427. ;
  428.  
  429. ; (if
  430. ;     (=
  431. ;         @user-level
  432. ;         2
  433. ;     )
  434. ;     (if
  435. ;         (askbool
  436. ;             (prompt "Install ChkTeX C-source files?")
  437. ;             (help
  438. ;                 "  If you select `yes', the source code files of the "
  439. ;                 "project will be installed in a directory of your selection. "
  440. ;                 "This may be handy for future reference, or if you wish to "
  441. ;                 "hack a bit on ChkTeX for yourself. Please read the COPYING "
  442. ;                 "file before doing so, however."
  443. ;             )
  444. ;             (default 0)
  445. ;         )
  446. ;         (
  447. ;             (set
  448. ;                 sourcedest
  449. ;                 (askdir
  450. ;                     (prompt "Where do you want the source installed?")
  451. ;                     (default "sc:source/")
  452. ;                     (help
  453. ;                         "  You can here select where you wish to install the "
  454. ;                         "C source of the main ChkTeX executable program. "
  455. ;                         "A directory will be created there named ChkTeX.\n\n"
  456. ;                         @askdir-help
  457. ;                     )
  458. ;                 )
  459. ;             )
  460. ;             (set
  461. ;                 sourcedir
  462. ;                 (tackon
  463. ;                     sourcedir
  464. ;                     "ChkTeX
  465. ;             (tackon
  466. ;                 "s
  467. ;
  468. ;             (copyfiles
  469. ;                 (source "source/")
  470. ;                 (dest sourcedest)
  471. ;                 (choices
  472. ;                     "Workbench.c"
  473. ;                     "ChkTeX.h"
  474. ;                     "OpSys.c"
  475. ;                     "ChkTeX.c"
  476. ;                     "Resource.c"
  477. ;                     "Utility.c"
  478. ;                     "getopt.h"
  479. ;                     "getopt.c"
  480. ;                     "getopt1.c"
  481. ;                     "FindErrs.c"
  482. ;                 )
  483. ;                 (infos)
  484. ;             )
  485. ;         )
  486. ;     )
  487. ; )
  488.  
  489.